var express = require('express');
var router = express.Router();
var fs = require('fs');

var models = require('../models');
var User = models.User;
/* GET users listing. */
router.get('/', function(req, res, next) {

  // fs.readFile('sample.txt', 'utf-8', function (err, data) {
  //     if (err) {
  //         console.log(err);
  //     } else {
  //         res.send(data);
  //     }
  // });
  User.find(function(err, data){
    res.send(data);
  });
  
  // res.send('respond with a resource');
});

module.exports = router;
